﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" Src="/_controltemplates/15/ButtonSection.ascx" %>
<%@ Register TagPrefix="ctr" TagName="CreateTask" Src="~/_controltemplates/15/Validation.sp2010/CreateTask.ascx" %>
<%@ Register TagPrefix="ctr" TagName="CreateMail" Src="~/_controltemplates/15/Validation.sp2010/CreateMail.ascx" %>
<%@ Register TagPrefix="ctr" TagName="GridSteps" Src="~/_controltemplates/15/Validation.sp2010/GridSteps.ascx" %>


<%@ Page Language="C#"
    DynamicMasterPageFile="~masterurl/default.master"
    AutoEventWireup="true"
    Inherits="Validation.sp2010.WorkFlow.ValidationWorkflow.Rules"
    CodeBehind="Rules.aspx.cs" %>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    
    <script src="/_layouts/15/Validation.sp2010/jquery-1.8.2.min.js" type="text/javascript"></script>

    <style type="text/css">
        .ms-formbody {
            background-color: #f6f6f6;
        }

        .btn_link {
            margin-left: 10px;
            margin-top: 3px;
            margin-bottom: 3px;
        }
    </style>

    
    
    <asp:Label ID="ErrorFeatureLabel" runat="server" Text="<%$Resources:vwf,error_web_feature%>" ForeColor="Red" Visible="false"></asp:Label><br />
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <ctr:GridSteps runat="server" ID="GridStepsCtr" />
            </td>
        </tr>
        <tr>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>

                
            <div id="AddItemBloc">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <p style="text-align: right">

                                <asp:LinkButton CssClass="btn_link"  OnClick="newTaskStep_Click" ID="newTaskStep" runat="server">
                                    <asp:Literal runat="server" Text="<%$Resources:vwf,label_new_step_task %>" />
                                </asp:LinkButton>
                                <asp:LinkButton CssClass="btn_link"  OnClick="newMailStep_Click" ID="newMailStep" runat="server">
                                    <asp:Literal  runat="server" Text="<%$Resources:vwf,label_new_step_mail %>" />
                                </asp:LinkButton>
                            </p>
                        </td>
                    </tr>
                    <tr>

                        <asp:MultiView runat="server" ID="TabNewStep" ActiveViewIndex="0">
                            <asp:View runat="server">
                            <!-- Create task-->

                              <ctr:CreateTask runat="server" ID="CreateTaskCtr" />
                  <wssuc:ButtonSection runat="server" ShowStandardCancelButton="false">
                        <template_buttons>
                        <asp:PlaceHolder ID="PlaceHolder2" runat="server">               
                         <asp:Button OnClick="CreateTaskStep_Click"  ID="CreateTaskStepButton" runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_add %>" />
                            <asp:Button OnClick="EditTaskStep_Click" Visible="false"  ID="EditTaskStepButton"  runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_edit %>" />
                             <asp:Button OnClick="EditTaskCancel_Click" Visible="false"  ID="EditTaskCancel" runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_cancelbutton_text %>" />

                         </asp:PlaceHolder>
                         </template_buttons>
                         </wssuc:ButtonSection>

                            </asp:View>

                            <!-- Create mail--> 
                            <asp:View runat="server">
                     <ctr:CreateMail runat="server" ID="CreateMailCtr" />

                        <wssuc:ButtonSection runat="server" ShowStandardCancelButton="false">
                        <template_buttons>
                        <asp:PlaceHolder ID="PlaceHolder3" runat="server">               
                         <asp:Button OnClick="CreateMailStep_Click"  ID="CreateMailStepButton" runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_add %>" />
                         <asp:Button OnClick="EditMailStep_Click" Visible="false"  ID="EditMailStepButton" runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_edit %>" />
                         <asp:Button OnClick="EditMailCancel_Click" Visible="false"  ID="EditMailCancel" runat="server" CssClass="ms-ButtonHeightWidth" Text="<%$Resources:wss,multipages_cancelbutton_text %>" />

                         </asp:PlaceHolder>
                         </template_buttons>
                         </wssuc:ButtonSection>


                            </asp:View>
                        </asp:MultiView>


                    </tr>
                </table>
            </div>
                    </ContentTemplate>
            </asp:UpdatePanel>
        </tr>
    </table>
<asp:Label ForeColor="Red"  runat="server" Text="<%$Resources:vwf,error_no_step %>" Visible="false" ID="GlobalError" />

    <wssuc:ButtonSection runat="server" ShowStandardCancelButton="false">
        <template_buttons>
       <asp:PlaceHolder ID="PlaceHolder1" runat="server">               
         
    <asp:Button ID="AssociateWorkflow" runat="server" class="ms-ButtonHeightWidth" OnClick="AssociateWorkflow_Click" Text="<%$Resources:vwf,btn_associate_wf %>" />
    <asp:Button ID="Cancel" class="ms-ButtonHeightWidth" runat="server" Text="<%$Resources:wss,Workflow_Cancel %>" OnClick="Cancel_Click" />            
       </asp:PlaceHolder>
    </template_buttons>
    </wssuc:ButtonSection>


</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <asp:Literal runat="server" Text="<%$Resources:vwf,title_association %>" />
    <%--<script type="text/javascript" src="../../jquery-1.8.2.min.js" />--%>
    
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">
    <asp:Literal ID="Literal13" runat="server" Text="<%$Resources:vwf,title_association%>" />
</asp:Content>
